﻿@model Eieboom.Models.CategoryModel
@using res = Sob.Resource.Views.Admin.Admin;
@{Eieboom.General.GeneralConfigInfo ci = ViewBag.CI as Eieboom.General.GeneralConfigInfo;}
@section MenuInfo{
<ul> 
    <li>@Html.ActionLink("-"+ res.ManagementHome+" -", "Index", "Admin")</li>
    <li>@Html.ActionLink("-" + res.ContentManagement + " -", "AdminArticle", "Admin")</li>
    <li class="selected">
        <span class="selected-arrow">&nbsp;</span>
        <a href="###">- @res.Configuration -</a>
        <ul>
            <li>@Html.ActionLink(res.BasisSet, "AdminBaseConfig", "Admin")</li>
            <li  class="selected">@Html.ActionLink(res.CategorySettings, "AdminCategorySort", "Admin")</li>
            <li class="v10">@Html.ActionLink(res.ForumConfiguration, "AdminBBSConfig", "Admin")</li>
            <li>@Html.ActionLink(res.ReproducedConfiguration, "AdminPublishWebConfig", "Admin")</li>
        </ul>
    </li>
    <li>@Html.ActionLink("-" + res.UserManagement + " -", "AdminUserList", "Admin")</li>
</ul>
}
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> 
<div id="mainContent">
        <div id="leftBox">
          <div id="pagePath">
          @res.Location：@res.ModifyCategory
          </div>
          <div class="contentBox">
            <div class="contentBoxTop">
              <h3>
              @res.ModifyCategory
              </h3>
            </div>
            <div class="innerContent">
                @using (Ajax.BeginForm("AdminCategoryEdit", new AjaxOptions { LoadingElementId = "Loading", InsertionMode = InsertionMode.InsertBefore, OnSuccess = "ProcessSuccess" }))
                {
                    <div id="AjaxResult">
                    @Html.HiddenFor(m => m.CateId)
                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.CateName)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.CateName, new { style = "width: 200px;" })
                                @Html.ValidationMessageFor(m => m.CateName)
                            </div>
                        </div>
                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.ParentId)
                            </div>
                            <div class="editor-field">
                                @Html.DropDownList("ParentId")
                            </div>
                        </div>
                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.Type)
                            </div>
                            <div class="editor-field">
                                @Html.DropDownList("Type")
                            </div>
                        </div>

                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.ReplyPermit)
                            </div>
                            <div class="editor-field radios">
                                <input type="radio" value="1" name="ReplyPermit" id="ReplyPermit_y" @if (Model.ReplyPermit == "1")
                                                                                                    {@Html.Raw("checked=\"checked\"")}/>
                                <label for="ReplyPermit_y">
                                    @res.AllowComments</label>
                                <input type="radio" value="2" name="ReplyPermit" id="ReplyPermit_n" @if (Model.ReplyPermit != "1")
                                                                                                    {@Html.Raw("checked=\"checked\"")}/>
                                <label for="ReplyPermit_n">
                                    @res.NoComments</label>
                            </div>
                        </div>
                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.IsNav)
                            </div>
                            <div class="editor-field radios">
                                <input type="radio" value="1" name="IsNav" id="IsNav_y" @if (Model.IsNav == "1")
                                                                                        {@Html.Raw("checked=\"checked\"")}/>
                                <label for="IsNav_y">
                                    @res.Show</label>
                                <input type="radio" value="2" name="IsNav" id="IsNav_n" @if (Model.IsNav != "1")
                                                                                        {@Html.Raw("checked=\"checked\"")}/>
                                <label for="IsNav_n">
                                    @res.NoShow</label>
                            </div>
                        </div>
                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.IsIndex)
                            </div>
                            <div class="editor-field radios">
                                <input type="radio" value="1" name="IsIndex" id="IsIndex_y"  @if (Model.IsIndex == "1")
                                                                                             {@Html.Raw("checked=\"checked\"")}/>
                                <label for="IsIndex_y">
                                    @res.Show</label>
                                <input type="radio" value="2" name="IsIndex" id="IsIndex_n" @if (Model.IsIndex != "1")
                                                                                            {@Html.Raw("checked=\"checked\"")}/>
                                <label for="IsIndex_n">
                                    @res.NoShow</label>
                            </div>
                        </div>
                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.ListNum)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.ListNum, new { style = "width: 30px;" })
                                @Html.ValidationMessageFor(m => m.ListNum)
                            </div>
                        </div>
                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.ReName)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.ReName, new { style = "width: 200px;" })
                                @Html.ValidationMessageFor(m => m.ReName)
                            </div>
                        </div>
                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.CustomView)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.CustomView, new { style = "width: 200px;" })
                                @Html.ValidationMessageFor(m => m.CustomView)
                            </div>
                        </div>
                        <div class="label">
                            <div class="editor-label">
                                @Html.LabelFor(m => m.Status)
                            </div>
                            <div class="editor-field radios">
                                <input type="radio" value="1" name="Status" id="Status_y" @if (Model.Status == "1")
                                                                                          {@Html.Raw("checked=\"checked\"")}/>
                                <label for="Status_y">
                                    @res.Normal</label>
                                <input type="radio" value="2" name="Status" id="Status_n" @if (Model.Status != "1")
                                                                                          {@Html.Raw("checked=\"checked\"")}/>
                                <label for="Status_n">
                                    @res.Close</label>
                            </div>
                        </div>
                        <p>
                            <input type="image" src="/Content/image/admin/bt_submit.gif" name="BtnSubmit" id="BtnSubmit"> 
                            <span id="Loading" style="display:none;"> @res.Ajax_Tip</span>
                        </p>
                    </div>
                }
            </div><!--end of #box-3-->
          </div>

      </div><!-- end of #leftBox -->
              
  </div><!-- end of #content -->
@section Js{
<script type="text/javascript">
    function ProcessSuccess(re) {
        //$('#AjaxResult').html(re);
        window.location = "/BlogAdmin/Admin/AdminCategorySort";
    }
</script> 
}